<?php
/**
 * Created by PhpStorm.
 * User: HXL
 * Date: 2017/6/1
 * Time: 15:44
 */
namespace app\order\model;

use think\Db;

class States extends BaseModel{
    protected $tableName = 'ari_states';

    public function search($search){
        $num = 10;
        $count = Db::table($this->tableName)->where('sid', 'like', "%$search%")
            ->where('state', 'like', "%$search%")->count();
        $state = Db::table($this->tableName)->where('sid', 'like', "%$search%")
            ->where('state', 'like', "%$search%")
            ->paginate($num, $count, ['query' => request()->param()]);
        return $state;
    }



}